home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Views / Arrangements / ConstArrangementLoop.h < prev    next >
Text File  |  1997-06-28  |  665b  |  30 lines

  1. // ConstArrangementLoop.h
  2.  
  3. #ifndef ConstArrangementLoop_h
  4. #define ConstArrangementLoop_h
  5.  
  6. #ifndef ArrangementBase_h
  7. #include "ArrangementBase.h"
  8. #endif
  9.  
  10. class ConstArrangementLoop
  11.   {
  12.     private:
  13.         const ArrangementBase& arrangement;
  14.         uint32 index;
  15.     
  16.     public:
  17.         ConstArrangementLoop( const ArrangementBase& );
  18.         
  19.         bool Finished() const        { return index >= arrangement.PaneCount(); }
  20.         bool Unfinished() const        { return index < arrangement.PaneCount(); }
  21.         
  22.         void operator++();
  23.         void operator++(int)            { operator++(); }
  24.         
  25.         const Pane& operator*() const        { return arrangement[index]; }
  26.         const Pane *operator->() const    { return &arrangement[index]; }
  27.   };
  28.  
  29. #endif
  30.